﻿using System.Threading;
using System.Threading.Tasks;

namespace HardStyle.SimpleEventBus
{
    public interface IPublisher
    {
        Task Publish(object eventArg, CancellationToken cancellationToken = default);

        Task Publish<TEvent>(TEvent eventArg, CancellationToken cancellationToken = default)
            where TEvent : ISimpleEvent;
    }

}
